package com.qf.feign;

import com.qf.pojo.Customer;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author lixu
 */
@Component //由Spring来管理
//@RequestMapping("/feign")
public class SearchFeignImpl implements SearchFeign {


    @Override
    public String find() {
        //降级处理代码
        //System.out.println("===");
        return "find调失败了进行降级处理代码";
    }

    @Override
    public String findByName(String name, Integer age, Boolean flag) {
        return "findByName调失败了进行降级处理代码";
    }

    @Override
    public String findByPath(String name, Integer age, Boolean flag) {
        return "findByPath调失败了进行降级处理代码";
    }

    @Override
    public Customer findRequestBody(Customer customer) {
        //代码： 临时组装一个结果


        return new Customer(999,"调失败了进行降级处理代码",23);
    }

    @Override
    public Customer findById1(Integer id) {
        return null;
    }

    @Override
    public Customer findById(Integer id) {
        return null;
    }
/*
    @Override
    public Customer findById(Integer id) {
        return null;
    }*/
}
